Platform Explorer / Nuxeo Platform 2023.10

Operation Document.AddFacet (Add Facet)

Description

Adds the facet to the document.

WARNING: The save parameter is true by default, which means the document is saved in the database after adding the facet. It must be set to false when the operation is used in the context of an event that will fail if the document is saved (empty document created, about to create, before modification, ...).

Operation id Document.AddFacet
AliasesDocument.AddFacet
Category Document
Label Add Facet
Requires
Since

Parameters

Name Description Type Required Default value
facet string yes  
save boolean no true 

Signature

Inputs document, documents
Outputs document, documents

Implementation Information

Implementation Class Class: org.nuxeo.ecm.automation.core.operations.document.AddFacet
Contributing Component org.nuxeo.ecm.core.automation.coreContrib

JSON Definition

{
  "id" : "Document.AddFacet",
  "aliases" : [ "Document.AddFacet" ],
  "label" : "Add Facet",
  "category" : "Document",
  "requires" : null,
  "description" : "Adds the facet to the document. <p>WARNING: The save parameter is true by default, which means the document is saved in the database after adding the facet. It must be set to false when the operation is used in the context of an event that will fail if the document is saved (empty document created, about to create, before modification, ...).</p>",
  "url" : "Document.AddFacet",
  "signature" : [ "document", "document", "documents", "documents" ],
  "params" : [ {
    "name" : "facet",
    "description" : null,
    "type" : "string",
    "required" : true,
    "widget" : null,
    "order" : 0,
    "values" : [ ]
  }, {
    "name" : "save",
    "description" : null,
    "type" : "boolean",
    "required" : false,
    "widget" : null,
    "order" : 0,
    "values" : [ "true" ]
  } ]
}